<template>
	<view>
		<view v-if="selectpopup" @tap="handleCancel" :class="maskLayer == true ?'show bottom-modal cu-modal':''">
			<form @submit="formSubmit">
				<view class="selectView lb-picker-container" @tap.stop="">
					<view style="height: 84rpx;" class="lb-picker-header-actions">
						<!-- 取消 -->
						<!-- @tap.stop="handleCancel" -->
						<view class="lb-picker-action lb-picker-action-cancel" :class="centerText == '多选'?'minw80':''">
							<text class="lb-picker-action-cancel-text"
								:style="{ color: cancelColor }">{{ cancelText }}</text>
						</view>
						<!-- 中间 v-if="$slots['action-center']"-->
						<view class="lb-picker-action lb-picker-center">
							<text class="lb-picker-action-confirm-text"
								:style="{ color: centerColor }">{{ centerText }}</text>
						</view>

						<!-- 确定 -->
						<button v-if="ifForm" style="margin: 0;background: none;border:none;"
							class="lb-picker-action lb-picker-action-confirm" form-type="submit">
							<text class="lb-picker-action-confirm-text"
								:style="{ color: confirmColor }">{{ confirmText }}</text>
						</button>
						<button v-else style="margin: 0;background: none;border:none;"
							class="lb-picker-action lb-picker-action-confirm" @tap="checkboxTao('','','formhide')">
							<text class="lb-picker-action-confirm-text"
								:style="{ color: confirmColor }">{{ confirmText }}</text>
						</button>
					</view>
					<scroll-view scroll-y="true" style="height:500upx;" :scroll-top="radioScrollTop">
						<view v-if="mode == 'radio'">
							<radio-group @change="radioChange">
								<label v-for="(item, index) in items" :key="index">
									<view class="selectviewlb activeSelect" v-show="index === currentIndex"
										@tap="tapRadio(item,index)">
										<view class="selectviewlba" v-show="item.description!=null"
											@tap.stop="descriptionAdd(item.description)">
											<uni-icons type="help" color="'#007aff'" size="25" />
										</view>
										<radio :data-askId="item.askId" :data-ansId="item.ansId" :value="item.value"
											v-show="false" :checked="index === currentIndex" />
										{{item.label}}
									</view>
									<view class="selectviewlb" v-show="index !== currentIndex"
										@tap="tapRadio(item,index)">
										<view class="selectviewlba" v-show="item.description!=null"
											@tap.stop="descriptionAdd(item.description)">
											<uni-icons type="help" color="'#007aff'" size="25" />
										</view>
										<radio :data-askId="item.askId" :data-ansId="item.ansId" :value="item.value"
											v-show="false" :checked="index === currentIndex" />
										{{item.label}}
									</view>
								</label>
							</radio-group>
							<view class="other-felx" style="padding-bottom: 100rpx;" v-if="otherInput">
								<input class="otherInputStyle" type="text" placeholder="请输入" v-model="otherValue" />
								<view class="other-submit" @tap.stop="radioOtherSubmit">提交</view>
							</view>
						</view>
						<!-- 健康档案 -->
						<view v-if="mode == 'checkboxDan'">
							<view>
								<checkbox-group name="checkbox">
									<label v-for="(item, index) in items" :key="index">
										<view class="selectviewlb" v-show="!item.checked"
											@tap="checkboxTao(item,index,'')">
											<view class="selectviewlba"
												v-show="item.description!=null&&item.description!=undefined">
												<uni-icons type="help" color="'#007aff'" size="25" />
											</view>
											<!-- -->
											<checkbox :value="item.label" v-show="false" />{{item.label}}
										</view>
										<view class="selectviewlb activeSelect" v-show="item.checked"
											@tap="checkboxTao(item,index,'')">
											<view class="selectviewlba"
												v-show="item.description!=null&&item.description!=undefined"
												@tap.stop="descriptionAdd(item.description)">
												<uni-icons type="help" color="'#007aff'" size="25" />
											</view>
											<!-- -->
											<checkbox :value="item.label" v-show="false" />{{item.label}}
										</view>
									</label>
								</checkbox-group>
								<view class="other-felx" style="padding-bottom: 100rpx;" v-if="otherInput">
								<input class="otherInputStyle" placeholder="请输入" v-if="otherInput" type="text" v-model="otherValue" @input="other" />
									<view class="other-submit" @tap.stop="checkboxTao('','','formhide')">提交</view>
								</view>
							</view>
						</view>
						<view v-if="mode == 'checkbox'">
							<view>
								<!-- <checkbox-group name="checkbox" @change="checkboxChange">
									<label v-for="(item, index) in items" :key="index"> -->
								<block v-for="(item, index) in items" :key="index">
									<view class="selectviewlb" @tap="checkboxChangeTap(item.label,index)"
										v-show="!item.checked">
										<view class="selectviewlba"
											v-show="item.description!=null&&item.description!=undefined">
											<uni-icons type="help" color="'#007aff'" size="25" />
										</view>
										{{item.label}}
									</view>
									<view class="selectviewlb activeSelect" v-show="item.checked"
										@tap="checkboxChangeTap(item.label,index)">
										<view class="selectviewlba"
											v-show="item.description!=null&&item.description!=undefined"
											@tap.stop="descriptionAdd(item.description)">
											<uni-icons type="help" color="'#007aff'" size="25" />
										</view>
										{{item.label}}
									</view>
								</block>
								<!-- </label>
								</checkbox-group> -->
							</view>
						</view>
						<view style="height: 160upx;">

						</view>
					</scroll-view>
				</view>
			</form>
		</view>
		<!--饮食控件  -->
		<view v-if="ydPopup" @tap="handleCancel" class="lb-picker-mask lb-picker-mask-animation">
			<view class="box_ysyd" @tap.stop="">
				<view class="weui-flex titleView">
					<view>
						<view class="placeholder banstyle" @tap.stop="handleCancel()">
							取消
						</view>
					</view>
					<view class="weui-flex__item">
						<view class="placeholder">
							<text @tap="switchTime()">{{timeValue}}</text> <text class="timespan"></text>
						</view>
					</view>
					<view>
						<view class="placeholder banstyle" @tap.stop="formFood">
							确定
						</view>
					</view>
				</view>
				<view class="toolBodys" v-if="yundongys == 'ys'">
					<view class="weui-flex foodb">
						<view>
							<view class="placeholder">
								<image class="foodImage" :src="checkedData.imageLocalPath"></image>
							</view>
						</view>
						<view class="weui-flex__item" style="width: 300rpx;">
							<view class="placeholder">
								<view class="foodTitle ellipsis">
									{{checkedData.food}}
								</view>
								<view class="frigorie">
									摄入：<text style="color: #000;">{{scrollLeftNow}}</text>g 热量：<text
										style="color: #000;">{{foodHeat}}</text>千卡
								</view>
							</view>
						</view>
						<view>
							<view class="placeholder" style="width: 100upx;">
								<view @tap="deletetap('delete-ys')">
									<image v-if="typePage !==1"
										src="http://static.bsyjk.cn/l/C3992C0297CF40FD93FFB648B20FD11E.png"
										class="delete-img-box" mode=""></image>
								</view>
							</view>
						</view>
					</view>
					<view class="sleepView">
						<scroll-choose @scroll="scroll" :scrollStart="scrollStart" :scrollEnd="scrollEnd"
							:scrollLeft="scrollLeft" :maginL="maginL"></scroll-choose>
						<view>
						</view>
						<view class="sleepViewa">
						</view>
					</view>
				</view>
				<!-- 运动 -->
				<view class="toolBodys" style="height: 460upx;" v-if="yundongys == 'yd'">
					<view class="weui-flex foodb">
						<view>
							<view class="placeholder">
								<image class="foodImage" :src="checkedData.sportImageUrl"></image>
							</view>
						</view>
						<view class="weui-flex__item" style="width: 300rpx;">
							<view class="placeholder">
								<view class="foodTitle ellipsis">
									{{checkedData.dataSportName}}
								</view>
								<view class="frigorie">
									消耗：<text
										style="color: #000;">{{consume==''?checkedData.minHeatQuantity:consume}}</text>千卡
								</view>
							</view>
						</view>
						<view style="width: 100rpx;">
							<view class="placeholder">
								<view @tap="deletetap('delete-yd')" style="width: 100upx;">
									<image v-show="typePage !==1" class="delete-img-box"
										src="http://static.bsyjk.cn/l/C3992C0297CF40FD93FFB648B20FD11E.png"
										mode=""></image>
								</view>
							</view>
						</view>
					</view>
					<view class="sliderView">
						<u-slider v-model="sliderValue" block-width="40" block-color="#fff" active-color="#81C042"
							inactive-color="#F5F5F5" height="20" min="1" max="100" @moving="moving(sliderValue)">
						</u-slider>
					</view>
					<view class="weui-flex btmviewk">
						<view class="weui-flex__item">
							<view class="placeholder">
								运动时长
							</view>
						</view>
						<view class="weui-flex__item">
							<view class="placeholder" style="text-align: right;">
								{{sliderValue}}分钟
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<!-- end -->
		<!-- 多选  多个 -->
		<u-popup mode="bottom" v-model="cascadepopup" border-radius="20">
			<!-- 现病史  既往病史-->
			<view class="multipleChoice">
				<view class="healthName-title">
					<view class="healthName-title-left">
						{{healthName}}
					</view>
					<view class="healthName-title-hide" @click="cascadepopup=false">
					</view>
				</view>
				<view style="min-height: 400upx;">
					<block v-for="(item, index) in items" :key="index">
						<view class="checkbox-view" @tap="checkboxTao(item,index,'')" v-if="!item.checked">
							{{item.label}}
						</view>
						<view class="checkbox-view checkbox-actave" v-if="item.checked"
							@tap="checkboxTao(item,index,'')">
							{{item.label}}
						</view>
					</block>
					<input class="otherInputStyle" placeholder="请输入" v-if="otherInput" type="text" v-model="otherValue" @input="other" />
				</view>
				<view class="uni-btn-v" style="padding-bottom: 30upx;">
					<button class="uni-btn-cs" @tap="checkboxTao('','','reset')">重设</button>
					<button class="uni-btn-qd" @tap="checkboxTao('','','formhide')">确定</button>
				</view>
			</view>
		</u-popup>
		<!-- 评测 多选超过十个 -->
		<!-- 多选  多个 -->
		<view class="multipleChoice2" v-if="maxtenbr">
			<view class="healthName-title">
				<view class="healthName-title-left">
					多选
				</view>
			</view>

			<view style="min-height: 400upx;">
				<block v-for="(item, index) in items" :key="index">
					<view class="checkbox-view" @tap="checkboxChangeTap(item.label,index)" v-if="!item.checked">
						{{item.label}}
					</view>
					<view class="checkbox-view checkbox-actave" v-if="item.checked"
						@tap="checkboxChangeTap(item.label,index)">
						{{item.label}}
					</view>
				</block>
				<input class="otherInputStyle" placeholder="请输入" v-if="otherInput" type="text" v-model="otherValue" />
			</view>
			<view class="uni-btn-v" style="padding-bottom: 30upx;">
				<button class="uni-btn-cs" @tap="checkboxChangeTap('',9999)">重设</button>
				<button class="uni-btn-qd" @tap="formSubmitMax">确定</button>
			</view>
		</view>
	</view>
</template>

<script>
	import scrollChoose from './scroll-choose.vue'
	import uPopup from "@/uview-ui/components/u-popup/u-popup.vue"
	import uSlider from "@/uview-ui/components/u-slider/u-slider.vue"
	export default {
		components: {
			scrollChoose,
			uSlider,
			uPopup
		},
		props: {
			healthName:{
				type: String,
				default: '现病史'
			},
			value: [String, Number, Array],
			items: Array,
			mode: {
				type: String,
				default: 'radio'
			},
			typePage: {
				type: Number,
				default: 0 //默认未选择样式
			},
			current: {
				type: Number,
				default: 9999 //默认未选择样式
			},
			maskLayer: {
				type: Boolean,
				default: false
			},
			ifForm: {
				type: Boolean,
				default: true
			},
			centerText: {
				type: String,
				default: '单选'
			},
			timeValue: {
				type: String,
				default: '请选择'
			},
			confirmColor: {
				type: String,
				default: '#2EA7E0'
			},
			centerColor: {
				type: String,
				default: '#000000;'
			},
			cancelText: {
				type: String,
				default: ''
			},
			yundongys: {
				type: String,
				default: 'ys'
			},
			cancelColor: {
				type: String,
				default: '#2EA7E0'
			},
			confirmText: {
				type: String,
				default: ''
			},
			checkedData: {
				type: Object,
				default: {}
			},
			zIndex: {
				type: Number,
				default: 999
			},
		},
		data() {
			return {
				radioScrollTop: 0,
				otherValue: '', //其他症状
				otherInput: false, //是否选择其他
				maxtenbr: false, //多选大于十个
				currentIndex: '',
				multipleList: '', // 选择多选
				cascadepopupc: false, //弹窗2
				cascadepopup: false, //弹窗1
				ansId: '',
				consume: '', //消耗
				sliderValue: 1, //运动多少分钟
				foodHeat: '',
				scrollLeftNow: 100, //页面显示
				scrollLeft: 100, //初始值
				scrollStart: 1, //滚动区域起始值
				scrollEnd: 1000, //滚动区域终止值
				maginL: 5, //线间距
				ydPopup: false,
				maskBgColor: 'rgba(0, 0, 0, 0)',
				animation: true,
				ansIdArr: [],
				ansNameArr: [],
				ansNameArr: [],
				selectpopup: false,
				pushList: [],
			}
		},
		// 挂载数据
		mounted() {
			let multipleList = {
				"sort": 1,
				"healthList": [{
					"name": "疾病名称",
					"type": 4,
					"value": "肥胖,冠心病",
					"paperId": 5,
					"detailId": null
				}]
			}
			for (let i = 0; i < multipleList.healthList.length; i++) { //循环返回数组
				let value = multipleList.healthList[i].value;
				if (value) { //是否等于null
					let values = value.split(',');
					let items = []
					for (let j = 0; j < values.length; j++) {
						items.push({
							label: values[j],
							checked: true
						})
					}
					multipleList.healthList[i].value = items
				}
			}
			this.multipleList = multipleList
		},
		watch: {
			items(item) {
				
				console.log(item,11111)
				this.radioScrollTop = 0
				let ansIdArr = [],
					ansNameArr = [],
					askId = '',
					currentIndex, isother = false;
				for (let i = 0; i < item.length; i++) {
					console.info(item[i].checked,"item[i].checked2")
					if (item[i].checked) { //多选
					    currentIndex = i
						console.info(currentIndex,"currentIndex")
						ansIdArr.push(item[i].ansId)
						ansNameArr.push(item[i].ansName||item[i].value)
						askId = item[i].askId;
						if (item[i].ansName == '其他'||item[i].value == '其他') {
							isother = true
						}
					}
					
					if (item[i].defaultValue && item[i].ansName && item[i].defaultValue == item[i].ansName) { //单选
						currentIndex = i
					}
				}
				if(this.mode != 'checkboxDan'){
					this.otherValue = ''
				}
				this.otherInput = isother //默认关闭其他输入
				console.log(448, currentIndex)
				this.currentIndex = currentIndex
				this.ansIdArr = ansIdArr;
				this.radioScrollTop = currentIndex*30
				this.ansNameArr = ansNameArr;
				this.askId = askId
				this.$emit('itemsa', item)
			},
			checkedData(item) {
				this.consume = item.minHeatQuantity
				console.log(item, '43333333')
			}
		},
		methods: {
			otherValueFun(value){
				console.log(value,459999)
				this.otherValue = value
			},
			other(e){
				this.$emit('other',e)
			},
			sortData(a, b) {
				if (a.ansId) {
					a.ansId = a.ansId * 1
					b.ansId = b.ansId * 1
					return a.ansId - b.ansId
				} else {
					return a
				}

			},
			cascadeShowc() {
				this.cascadepopupc = true;
			},
			// 多选弹窗
			cascadeShow() {
				this.cascadepopup = true;
			},
			deletetap(type) {
				if (type == 'delete-ys') {
					let scrollLeftNow = this.scrollLeftNow;
					this.$emit('formFood', {
						foodId: this.checkedData.id,
						foodHeat: this.foodHeat,
						intakeWeight: this.scrollLeftNow,
						type: 'delete-ys'
					})
				} else if (type == 'delete-yd') {
					let consume = this.consume == '' ? this.checkedData.minHeatQuantity : this.consume;
					this.$emit('formFood', {
						dataSportId: this.checkedData.dataSportId,
						consume: this.getnum(consume),
						sliderValue: this.sliderValue,
						type: 'delete-yd'
					})
				}

				this.ydPopup = false;
			},
			checkboxTao(item, index, type) {

				if (type == 'formhide') {
					let checked = false;
					for (let i = 0; i < this.items.length; i++) {
						if (this.items[i].checked) {
							checked = true
							break;
						}
					}
					if (checked) {
						this.selectpopup = false; //普通弹窗
						this.cascadepopup = false; //多个
						this.$emit('checkboxData', { //提交
							data: item,
							index: index,
							type: type
						})
					} else {
						uni.showToast({
							title: '至少选择一项',
							icon: 'none',
							duration: 3000
						});
					}
				} else { //平常单选
					this.$emit('checkboxData', {
						data: item,
						index: index,
						type: type
					})
				}
			},
			tapRadio(item, index) {
				this.$emit('RadioData', {
					data: item,
					index: index
				})
			},
			getnum(num) {
				return Math.round(num * 100) / 100
			},
			moving(e) {
				let checkedData = this.checkedData;
				this.consume = this.getnum(e * checkedData.minHeatQuantity)
			},
			formFood() {
				if (this.yundongys == 'ys') {
					let scrollLeftNow = this.scrollLeftNow;
					this.$emit('formFood', {
						foodId: this.checkedData.id,
						foodHeat: this.foodHeat,
						intakeWeight: this.scrollLeftNow,
						type: 'ys'
					})
					this.ydPopup = false;
				} else {
					let consume = this.getnum(this.consume == '' ? this.checkedData.minHeatQuantity : this.consume)
					this.$emit('formFood', {
						dataSportId: this.checkedData.dataSportId,
						consume: consume,
						sliderValue: this.sliderValue,
						type: 'yd'
					})
					this.ydPopup = false;
				}
			},
			scroll(val) {
				this.scrollLeftNow = val;
				this.foodHeat = parseInt(this.checkedData.foodHeat * 0.01 * val)
			},
			descriptionAdd(data) {
				let pushList = this.pushList,
					isRepea = false;
				for (let i = 0; i < pushList.length; i++) {
					if (pushList[i] == data) {
						console.log(pushList[i], data)
						isRepea = true;
						break;
					}
				}
				if (!isRepea) {
					this.pushList.push(data)
					this.$emit('descriptionAdd', data)
				}
			},
			switchTime() {
				this.ydPopup = false;
				this.$emit('switchTime', true)
				// this.$emit('scrollLeftNow',this.scrollLeftNow)
			},
			ydShow() {
				this.sliderValue = 1
				this.ydPopup = true
			},
			// 多选超过十个
			formSubmitMax() {
				if (this.ansIdArr.length == 0) {
					uni.showToast({
						title: '最少选择一项',
						icon: 'none',
						duration: 2000
					});
					return
				}
				if (this.otherInput) { //选择其他情况
					if (this.otherValue != '' && this.otherValue != null) { //输入框不为空
						this.ansNameArr.forEach((item, index) => { //
							if (item == '其他') {
								this.$set(this.ansNameArr, index, this.otherValue)
							}
						})
					}
				}

				this.maxtenbr = false;
				this.selectpopup = false;
				let ansId = this.ansIdArr.join(','),
					askId = this.askId,
					ansName = this.ansNameArr.join(',');
				console.log({
					ansValue: ansId,
					ansId: 0,
					askId: askId,
					ansValue4: ansName
				})
				uni.$emit('radioChange', {
					ansValue: ansName,
					ansId: ansId,
					askId: askId,
					ansValue4: ansName
				});
				this.ansIdArr = []

			},
			formSubmit(e) {
				if (this.ansIdArr.length == 0) {
					uni.showToast({
						title: '最少选择一项',
						icon: 'none',
						duration: 2000
					});
					return
				}
				this.selectpopup = false;
				console.log(e)
				let ansId = this.ansIdArr.join(','),
					askId = this.askId,
					ansName = this.ansNameArr.join(',');
				console.log({
					ansValue: ansId,
					ansId: 0,
					askId: askId,
					ansValue4: ansName
				})
				// return
				uni.$emit('radioChange', {
					ansValue: ansName,
					ansId: ansId,
					askId: askId,
					ansValue4: ansName
				});
				this.ansIdArr = []
			},
			show() {
				this.selectpopup = true;
				this.pushList = []; //当前页面存储回复
			},
			hide() {
				this.selectpopup = false;
				// this.pushList = []; //当前页面存储回复
			},
			maxtentrue() {
				this.maxtenbr = true
			},
			checkboxChangeTap(values, index) {

				this.otherInput = false
				if (index != 9999) {
					this.items[index].checked = !this.items[index].checked
				}
				let ansIdArr = [],
					ansNameArr = [],
					askId, isone;
				var items = this.items;
				for (let i = 0; i < items.length; i++) {
					if (index == 9999 || items[i].ansName == '无' && items[i].checked == true ||
						items[i].ansName == '无以下疾病' && items[i].checked == true ||
						items[i].ansName == '无症状' && items[i].checked == true ||
						items[i].ansName == '以下食物都不吃' && items[i].checked == true) {
						isone = true
					}
					if (items[i].ansName == '其他' && items[i].checked == true && !isone||items[i].value == '其他' && items[i].checked == true && !isone) {
						console.log('其他被选中了')
						this.otherInput = true //展示输入框
					}

					if (isone && i != index) { //不等于当前选中  
						items[i].checked = false
					} else if (items[i].checked == true) {
						if (items[i].ansName) {
							ansIdArr.push(items[i].ansId);
							ansNameArr.push(items[i].ansName)
							askId = items[i].askId;
						} else {
							ansNameArr.push(items[i].value)
						}
					}

				}
				console.log(items, askId, ansIdArr, ansNameArr, '6100000000000000000')
				this.items = items
				this.$emit('itemsa', items)
				this.askId = askId
				this.ansIdArr = ansIdArr;
				this.ansNameArr = ansNameArr;
			},
			checkboxChange: function(e) {
				let ansIdArr = [],
					ansNameArr = [],
					askId;
				var items = this.items,
					values = e.detail.value,
					t = this;
				for (var i = 0, lenI = items.length; i < lenI; ++i) {
					const item = items[i]
					if (values.includes(item.value)) {
						this.$set(item, 'checked', true);
						ansIdArr.push(item.ansId);
						ansNameArr.push(item.ansName)
						askId = item.askId;
					} else {
						this.$set(item, 'checked', false)
					}
				}
				this.$emit('itemsa', items)
				t.askId = askId
				t.ansIdArr = ansIdArr;
				t.ansNameArr = ansNameArr;
			},
			radioOtherSubmit() {
				console.log(this.items.value)
				let items = this.items,
					askId,
					ansId;
				for (let i = 0; i < items.length; i++) {
					if (items[i].value == '其他') {
						askId = items[i].askId
						ansId = items[i].ansId
					}
				}
				uni.$emit('radioChange', {
					ansValue: this.otherValue,
					ansId: ansId,
					askId: askId
				});
			},
			radioChange(evt) {
				let _this = this
				console.log(evt)
				if (evt.target.value != '其他') {
					this.selectpopup = false;
				}
				for (let i = 0; i < this.items.length; i++) {
					if (this.items[i].value === evt.target.value && evt.target.value != '其他') {
						uni.$emit('radioChange', {
							ansValue: this.items[i].value,
							ansId: this.items[i].ansId,
							askId: this.items[i].askId
						});
						break;
					} else if (evt.target.value == '其他') {
						this.otherInput = true
						setTimeout(e=>{
							_this.radioScrollTop = 9999
						},500)
						break;
					}
				}
			},
			handleConfirm() {
				this.selectpopup = false;
			},
			handleCancel(e) {
				this.ydPopup = false;
				this.selectpopup = false;
			}
		}
	}
</script>

<style lang="scss">
	@import "./style/picker.scss";

	// 多选档案
	// 多选
	.multipleChoice {
		width: 750upx;
		height: 1106upx;
		background: #FFFFFF;
		padding: 0 23upx;

		.healthName-title {
			padding: 46upx 0 22upx;
			font-size: 30upx;
			color: #2EA7E0;
			display: flex;

			.healthName-title-left {
				width: 660upx;
				font-weight: 500;
			}

			.healthName-title-hide {
				width: 44upx;
				height: 44upx;
				background: url(http://static.bsyjk.cn/hideiconm/CFC6908A448C4C59805E81D6FC99CE26.png)no-repeat;
				background-size: 100% 100%;
				float: right;
			}
		}

		.uni-btn-v {
			display: flex;
			width: 580upx;
			margin: 0 auto;

			.uni-btn-cs,
			.uni-btn-qd {
				width: 270upx;
				height: 78upx;
				background: #FFFFFF;
				border-radius: 4upx;
				border: 1upx solid #E5E5E5;
				font-size: 26upx;
			}

			.uni-btn-qd {
				color: #fff;
				background: #2EA7E0;
			}
		}

		.checkbox-view {
			display: inline-block;
			min-width: 150upx;
			padding: 0 20upx;
			height: 54upx;
			margin: 0 18upx 30upx 0;
			border-radius: 4upx;
			background: #F5F5F5;
			text-align: center;
			font-size: 26upx;
			font-weight: 400;
			color: #333333;
			line-height: 54upx;
		}

		.checkbox-actave {
			background: #DEF1FA;
			color: #2EA7E0;
			position: relative;
		}

		.checkbox-actave::before {
			content: '';
			width: 30upx;
			height: 30upx;
			position: absolute;
			bottom: 0;
			right: 0;
			background: url(http://static.bsyjk.cn/duihaoduigou/22207A6BCE044AFC9423FF8F8F5EF8D2.png)no-repeat;
			background-size: 59upx 61upx;
		}
	}

	// 评测选择
	.multipleChoice2 {
		width: 750upx;
		height: 842upx;
		background: #FFFFFF;
		padding: 0 23upx;
		overflow: auto;
		position: fixed;
		bottom: 0;
		z-index: 9;
		border-radius: 30upx 30upx 0 0;
		box-shadow: 9upx 9upx 80upx 8upx rgba(155, 155, 155, 0.46);

		.healthName-title {
			padding: 46upx 0 22upx;
			font-size: 30upx;
			color: #2EA7E0;
			display: flex;

			.healthName-title-left {
				width: 660upx;
				font-weight: 500;
			}

			.healthName-title-hide {
				width: 44upx;
				height: 44upx;
				background: url(http://static.bsyjk.cn/hideiconm/CFC6908A448C4C59805E81D6FC99CE26.png)no-repeat;
				background-size: 100% 100%;
				float: right;
			}
		}

		.uni-btn-v {
			display: flex;
			width: 580upx;
			margin: 0 auto;

			.uni-btn-cs,
			.uni-btn-qd {
				width: 270upx;
				height: 78upx;
				background: #FFFFFF;
				border-radius: 4upx;
				border: 1upx solid #E5E5E5;
				font-size: 30upx;
				line-height: 78upx;
			}

			.uni-btn-qd {
				color: #fff;
				background: #2EA7E0;
			}
		}

		.checkbox-view {
			display: inline-block;
			min-width: 150upx;
			padding: 0 20upx;
			height: 54upx;
			margin: 0 18upx 30upx 0;
			border-radius: 4upx;
			background: #F5F5F5;
			text-align: center;
			font-size: 30upx;
			font-weight: 400;
			color: #333333;
			line-height: 54upx;
		}

		.checkbox-actave {
			background: #DEF1FA;
			color: #2EA7E0;
			position: relative;
		}

		.checkbox-actave::before {
			content: '';
			width: 30upx;
			height: 30upx;
			position: absolute;
			bottom: 0;
			right: 0;
			background: url(http://static.bsyjk.cn/duihaoduigou/22207A6BCE044AFC9423FF8F8F5EF8D2.png)no-repeat;
			background-size: 59upx 61upx;
		}
	}

	// 最小宽度80
	.minw80 {
		min-width: 130upx;
	}

	.timespan {
		width: 0;
		height: 0;
		position: relative;
		top: 30upx;
		left: 10upx;
		border-left: 12upx solid transparent;
		border-right: 12upx solid transparent;
		border-top: 12upx solid #000;
	}

	.banstyle {
		padding: 0upx 30upx;
		font-weight: 400;
		color: #2EA7E0;
	}

	.titleView {
		height: 84upx;
		text-align: center;
		line-height: 84upx;
		font-size: 34upx;
		font-weight: 400;
		color: #000000;
	}

	.lb-picker-mask {
		background: rgba(0, 0, 0, 0.4);
	}

	.box_ysyd {
		width: 750upx;
		height: 517upx;
		position: absolute;
		background: #fff;
		bottom: 0;
		border-radius: 20upx 20upx 0 0;
	}

	.selectView {
		width: 100%;
		height: 500upx;
		position: fixed;
		background: #fff;
		box-sizing: border-box;
		border-radius: 30rpx 30rpx 0 0;
		box-shadow: 9px 9px 80px 8px rgba(155, 155, 155, 0.46);
		text-align: center;
		bottom: 0;
		z-index: 9999;
		overflow: hidden;
	}

	.selectviewlb {
		padding: 10upx 0;
		font-size: 34upx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #000000;
		line-height: 64upx;
		position: relative;
		border-bottom: 1px solid #f5f5f5;
	}

	.selectviewlba {
		width: 50rpx;
		padding: 15upx 0;
		position: absolute;
		top: 15rpx;
		right: 30rpx;
	}

	.activeSelect {
		background: #2EA7E0;
		color: #fff;
	}

	// 运动饮食
	.toolBodys {
		background: url(https://bsyjk-pic.bsyjk.cn/toprbg/10099E8526734AC383D6ADEED897F016.png)no-repeat;
		background-size: 750rpx 707rpx;
		padding: 1upx;

		.foodb {
			margin-top: 30upx;
		}
	}

	.sliderView {
		width: 640upx;
		height: 17upx;
		border-radius: 9upx;
		margin: 58upx auto 0;
	}

	.btmviewk {
		width: 640upx;
		margin: 30upx auto 35upx;
		color: #fff;
	}

	.sleepView {
		height: 270upx;
		position: relative;

		.sleepViewa {
			width: 32upx;
			height: 77upx;
			position: absolute;
			bottom: 58upx;
			left: 50%;
			background: #fff;
			transform: translateX(-50%);
			background: url(https://bsyjk-pic.bsyjk.cn/zhizhen/D09A3F66E12D42898BF442C2AAA2A385.png)no-repeat;
			background-size: 32upx 77upx;
		}
	}

	.kachbg {
		width: 4640upx;
		height: 30upx;
		background: url(https://bsyjk-pic.bsyjk.cn/ysweitu/DAC670977F244AC9AD417113A9061568.png);
		background-size: 702upx 30upx;
	}

	.inlineblockn {
		display: inline-block;
		width: 100upx;
		font-size: 24upx;
		text-align: center;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: #FFFFFF;
		line-height: 33upx;
	}

	.scrollView {
		padding-top: 99rpx;
		white-space: nowrap;
		display: flex;
		height: 370upx;
	}

	.foodb {
		width: 702upx;
		height: 134upx;
		background: #FFFFFF;
		border-radius: 16upx;
		border: 1upx solid #E2E1E2;
		margin: 0 auto 20upx;

		.foodImage {
			width: 100upx;
			height: 100upx;
			margin: 17upx 20upx;
		}

		.foodTitle {
			padding: 27upx 0 2upx;
			font-size: 30upx;
			font-weight: 500;
			color: #4A4A4A;
		}

		.frigorie {
			font-size: 24upx;
			font-weight: 400;
			color: #9B9B9B;
			line-height: 33upx;
		}

		.addView {
			width: 44upx;
			height: 44upx;
			// background: pink;
			margin: 47upx 21upx 0 0;
			background: url(https://bsyjk-pic.bsyjk.cn/addbtn/94138F7D37924E0998170B4C3FDB41F1.png)no-repeat;
			background-size: 44upx 44upx;
		}
	}

	.delete-img-box {
		width: 40upx;
		height: 40upx;
		display: block;
		margin: 40upx auto 0;
	}

	// end
	.otherInputStyle {
		font-size: 24rpx;
		width: 640rpx;
		height: 60rpx;
		border: 1px solid #F5F5F5;
		margin: 10rpx 0 20rpx;
		padding: 0 20rpx;
	}

	.other-felx {
		display: flex;
		height: 60rpx;

		.otherInputStyle {
			width: 400rpx;
			font-size: 24rpx;
			height: 60rpx;
			border: 1px solid #F5F5F5;
			margin: 10rpx 20rpx 20rpx;
			padding: 0 20rpx;
			text-align: left;
		}

		.other-submit {
			width: 200rpx;
			height: 60rpx;
			text-align: center;
			line-height: 60rpx;
			margin: 10rpx 20rpx 20rpx;
			background: #2EA7E0;
			color: #fff;
			border-radius: 50rpx;
		}
	}
</style>
